#include <FreeRTOS.h>
#include <task.h>
#include <stdio.h>
#include <lwip/tcpip.h>
#include "wifi_execute.h"
#include "rtc_op.h"
#include "led_op.h"
#include "temperature.h"
#include "io_out.h"
#include "http_server.h"
#include "file_op.h"
#include "button.h"
#include "buzzer.h"
#include "light.h"
#include "control_logic.h"

void main()
{
    puts("[OS] main entry\r\n");
    bl_sys_init();
    init_spiffs();
    init_io();
    init_buzzer();
    init_rtc();
    init_led();
    init_light();
    wifi_init();
    tcpip_init(NULL, NULL);
    // init_button();
    xTaskCreate(http_server_start, (char *)"http server", 1024 * 12, NULL, 15, NULL);
    init_temperature();
    init_control_logic();
    printf("all things ready");
}